* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.cell {
    width: 25px;
    height: 25px;
    user-select: none;
    float: left;
    border: 2px solid black;
    border-left: 0;
    border-bottom: 0;
    transition: transform 1s linear;
}
.cell:first-child {
    border-left: 1px solid black;
}
.cell.one {
    background-color: lightgreen;
}
.cell.two {
    background-color: lightblue;
}
.cell.three {
    background-color: lightpink;
}
.cell.four {
    background-color: lightyellow;
}
.cell.five {
    background-color: lightcoral;
}
.cell:first-child {
    margin-left: 1px;
}
.line:last-child > .cell {
    border-bottom: 2px solid black;
}
#id-div-map > .line:nth-child(-n+4) {
    display: none;
}
#id-div-map {
    background-color: #222;
    display: inline-block;
    position: relative;
}
#id-div-next-block-map {
    background-color: #222;
    display: inline-block;
}
.line.clearfix::after {
    display: block;
    content: '';
    clear: both;
}
#id-div-container {
    position: relative;
    display: inline-flex;
    background-color: lightgrey;
    box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.5);
}
#id-div-panel {
    display: inline-block;
    margin: 0 30px 0 30px;
    user-select: none;
}
#id-div-gameover {
    display: none;
    position: absolute;
    font-weight: bold;
    color: red;
    top: 50%;
    left: 50px;
    width: 150px;
    transform: translateY(-50%);
    font-size: 20px;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 3px;
}
#id-div-gameover.show {
    display: block;
    background-color: lightgray;
    user-select: none;
}
#id-div-score-container, #id-div-lines-container, #id-div-level-container {
    white-space: nowrap;
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0 8px 0;
}
#id-div-score, #id-div-lines, #id-div-level {
    color: red;
    text-align: right;
    font-size: 20px;
}

.button {
    white-space: nowrap;
    padding: 5px;
    font-weight: bold;
    border: 1px solid rgb(100, 100, 110);
    color: white;
    background-color: lightblue;
    border-radius: 2px;
    cursor: pointer;
    user-select: none;
    margin-top: 8px;
    text-align: center;
}
#id-div-pause.show, #id-div-play.show {
    display: block;
}
#id-div-pause, #id-div-play {
    display: none;
}
#id-div-operations {
    display: none;
    height: 75px;
}
#id-div-operations.show {
    display: block;
}
.key {
    display: inline-block;
    font-weight: bold;
    color: red;
    margin-right: 5px;
}
body {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('image/tetris-bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    user-select: none;
}
#id-div-actions {
    display: none;
}
.dialog {
    width: 200px;
    height: 100px;
    border: 2px solid lightgray;
    background-color: lightpink;
    box-shadow: 2px 2px 2px 0 rgba(10, 10, 10, 0.3);
    border-radius: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    display: none;
}
.dialog.show {
    display: block;
}
.dialog-tips {
    margin: 10px;
}
.yes, .no {
    padding: 5px 10px;
    background-color: lightyellow;
    border-radius: 5px;
    border: 2px solid lightgray;
    position: absolute;
    bottom: 10%;
    cursor: pointer;
}
.yes {
    left: 15%;
}
.no {
    right: 15%;
}
@media (min-width: 100px) and (max-width: 600px) {
    body {
        align-items: flex-start;
        flex-wrap: wrap;
        overflow: hidden;
        height: 100%;
        background-image: none;
        background-color: #FEC5EF;
    }
    .line {
        display: flex;
    }
    .cell {
        width: 6vw;
        height: 6vw;
    }
    #id-div-container {
        width: 98vw;
        margin-top: 20px;
    }
    #id-div-actions {
        display: flex;
        user-select: none;
    }
    .button.guides {
        display: none;
    }
    #id-div-gameover {
        left: 6vw;
        width: 48vw;
        text-align: center;
    }
}

.action {
    width: 15vw;
    height: 15vw;
    border-radius: 50%;
    position: absolute;
    background-color: #ADD8E6;
    border: 1px solid #64646E;
    box-shadow: 2px 2px 1px 0px rgba(0, 0, 0, 0.2);
}
.action.left {
    left: 4vw;
    top: 50%;
    transform: translateY(-50%);
}
.action.right {
    right: 4vw;
    top: 50%;
    transform: translateY(-50%);
}
.action.down {
    bottom: 4vw;
    left: 50%;
    transform: translateX(-50%);
}
.action.rotate {
    top: 4vw;
    left: 50%;
    transform: translateX(-50%);
}
.lock {
    width: 20vw;
    height: 20vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.movements, .lock-container {
    width: 50vw;
    height: 50vw;
    position: relative;
}
.action > span {
    position: absolute;
    font-size: 10px;
    white-space: nowrap;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}
